<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return dwzSearch(this, 'dialog');" action="${pageContext.request.contextPath}/shop/shop/ProductInventoryList?shopId=${requestScope.shopId}" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>商品名：<input type="text" name="normName" size="30" value="${requestScope.dwzPageBean.countResultMap.normName}" placeholder="请输入商品名" /></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<table class="table" targetType="dialog" asc="asc" desc="desc" width="100%" layoutH="100%">
		<thead>
			<tr>
				<th orderField="normname" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'normname'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>商品名</th>
				<th orderField="productnum" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'productnum'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>商品编号</th>
				<th orderField="inventory" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'inventory'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>总库存</th>
				<th orderField="operator" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'operator'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>操作人</th>
				<!-- <th>类型0-单号入库、1-线下出售、2-线上出售、3-手动入库、4-分店自动录入、5-总店自动录入</th> -->
			</tr>
		</thead>
		<tbody>
			<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
				<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
					<tr>
						<td>${record.normname}</td>
						<td>${record.productnum}</td>
						<td>${record.inventory}</td>
						<td>${record.operator}</td>
						<%-- <td>${record.type == 0 ? '单号入库': ''}${record.type == 1 ? '线下出售': ''}${record.type == 2 ? '线上出售': ''}${record.type == 3 ? '手动入库': ''}${record.type == 4 ? '分店自动录入': ''} ${record.type == 5 ? '总店自动录入': ''}</td> --%>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
</div>